package com.bjsxt;

public class TestTwo {
    public static void main(String[] args) {
        Generic02<String> generic02 = new Generic02<>(); //创建对象是指定T的类型

         generic02.setFlag("happy");
        String name = generic02.getFlag();
        System.out.println(name);

        Generic02<Integer> generic021 = new Generic02<>();
        generic021.setFlag(12212);
        Integer name2 = generic021.getFlag();
        System.out.println(name2);
    }
}
